package com.utils.buildutil;

import com.bean.Role;
import com.bean.Goods;
import com.dto.BaseInfoDTO;
import com.utils.ParamUtil;

import java.util.ArrayList;
import java.util.List;

/**
 * @author FatterShadystart
 * @create 2023-02-28 1:17
 */
public class GoodsBuildUtil {

    public static List<Goods> buildGoodsList(Goods goods) {
        List<Goods> goodsList = new ArrayList<>();
        goodsList.add(goods);
        return goodsList;
    }

    public static List<Goods> buildGoodsListInsert(Goods goods) {
        List<Goods> goodsList = new ArrayList<>();
        goodsList.add(goods);
        return goodsList;
    }

//    public static List<Goods> buildGoodsListUpdate(Goods goods) {
//        List<Goods> goodsList = new ArrayList<>();
//        goodsList.add(goods);
//        return goodsList;
//    }
//    public static List<Goods> buildGoodsListLogin(Goods goods) {
//        List<Goods> goodsList = new ArrayList<>();
//        goodsList.add(goods);
//        return goodsList;
//    }
//
    public static List<Goods> buildGoodsListByGoodsIdList(List<Long> goodsIdList) {

        List<Goods> goodsList = new ArrayList<>();
        for (Long goodsId : goodsIdList) {
            Goods goods = new Goods();
            goods.setGoodsId(goodsId);
            goodsList.add(goods);
        }
        return goodsList;
    }

//    public static List<Role> buildGoodsListByGoodsRoleList(Integer size, String goodsRole) {
//        List<Role> roleList = new ArrayList();
//        for (int i = 0; i < size; i++) {
//            Role roleAdd = new Role();
//            roleAdd.setGoodsRole(goodsRole);
//            roleList.add(roleAdd);
//        }
//        return roleList;
//    }
//
//
//    public static List<Goods> buildGoodsListRegister(Goods goods, BaseInfoDTO baseInfoDTO) {
//        List<Goods> goodsList = new ArrayList<>();
//        //设置baseInfo的信息到goods中
//        ParamUtil.setBaseInfoNoPage(goods, baseInfoDTO);
//        goodsList.add(goods);
//        return goodsList;
//    }
//
//    public static List<Long> buildGoodsRoleIdList(Long goodsRoleId) {
//        List<Long> goodsRoleIdList = new ArrayList<>();
//        goodsRoleIdList.add(goodsRoleId);
//        return goodsRoleIdList;
//    }
//
//    public static List<Role> buildRoleList(String goodsRole) {
//        List<Role> roleList = new ArrayList<>();
//        Role role = new Role();
//        role.setGoodsRole(goodsRole);
//        roleList.add(role);
//        return roleList;
//    }
//

}
